#include <string>

namespace google {
namespace protobuf {
namespace compiler {
  class CodeGenerator;
}  // namespace compiler
}  // namespace protobuf
}  // namespace google

namespace protoserv {
namespace compiler {

bool IsMethodIdValid(int method_id);

int ComputeMethodId(const std::string& method_name);

class ProtoservPlugin {
 public:
  template <class ExtGenerator, class RpcGenerator>
  static int Main(int argc, char* argv[]) {
    ExtGenerator ext_generator;
    RpcGenerator rpc_generator;
    return Main(argc, argv, &ext_generator, &rpc_generator);
  }

 private:
  static int Main(int argc, char* argv[],
                  google::protobuf::compiler::CodeGenerator* ext_generator,
                  google::protobuf::compiler::CodeGenerator* rpc_generator);
};

}  // namespace compiler
}  // namespace protoserv
